﻿using Microsoft.EntityFrameworkCore;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;

namespace DFGK_WMS.Model.Models
{
    /// <summary>
    /// 盘点结果记录
    /// </summary>
    [Index(nameof(OrderSn), IsUnique = true)]
    public partial class TStocktakeResultRecord 
    {
        /// <summary>
        /// 盘点记录Id
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 订单Id
        /// </summary>
        public int OrderId { get; set; }
        /// <summary>
        /// 订单编码
        /// </summary>
        public string OrderSn { get; set; }
        /// <summary>
        /// 库房Id
        /// </summary>
        public int WarehouseId { get; set; }
        /// <summary>
        /// 库房
        /// </summary>
        public string WarehouseName { get; set; }
        /// <summary>
        /// 库区Id
        /// </summary>
        public int? AreaId { get; set; }
        /// <summary>
        /// 库区
        /// </summary>
        public string AreaName { get; set; }
        /// <summary>
        /// 单据类型Id
        /// </summary>
        public int? BillTypeId { get; set; }
        /// <summary>
        /// 单据类型
        /// </summary>
        public string BillTypeName { get; set; }
        /// <summary>
        /// 仓位Id
        /// </summary>
        public int? CellId { get; set; }
        /// <summary>
        /// 仓位编码
        /// </summary>
        public string CellCode { get; set; }
        /// <summary>
        /// 仓位深度
        /// </summary>
        public int? CellDepthIndex { get; set; }
        /// <summary>
        /// 包装条码：如料箱条码。整垛盘点为空（不拆箱盘点），否则不允许为空
        /// </summary>
        public string PackageBarcode { get; set; }
        /// <summary>
        /// 垛条码
        /// </summary>
        public string PalletBarcode { get; set; }
        /// <summary>
        /// 物料Id
        /// </summary>
        public int? MaterialId { get; set; }
        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }
        /// <summary>
        /// 物料条码
        /// </summary>
        public string MaterialBarcode { get; set; }
        /// <summary>
        /// 扫描条码
        /// </summary>
        public string ScanBarcode { get; set; }
        /// <summary>
        /// 原始数量
        /// </summary>
        public decimal? OriginalQty { get; set; }
        /// <summary>
        /// 盘点后数量
        /// </summary>
        public decimal? CountQty { get; set; }
        /// <summary>
        /// 盘点单位Id
        /// </summary>
        public int? UnitId { get; set; }
        /// <summary>
        /// 盘点单位：通常为物料的基本单位
        /// </summary>
        public string UnitName { get; set; }
        /// <summary>
        /// 是否已处理
        /// </summary>
        public byte IsHandle { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
        /// <summary>
        /// 创建人Id
        /// </summary>
        public int? CreateUserId { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        public string CreateUserName { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateDate { get; set; }
        /// <summary>
        /// 盘点结果状态:1-盘平;2-盘盈;3-盘亏;
        /// </summary>
        public int? Status { get; set; }
    }
}
